<script setup lang="ts">


const selectFolder = async () => {
  const folderPath = 'E:/file-manager'; // 可通过对话框选取
  const result = await window.electronAPI.readDirectory(folderPath);
  if (result.success) {
    console.log('文件列表:', result.files);
  } else {
    console.error('读取失败:', result.message);
  }
};
</script>

<template>
  <button @click="selectFolder">读取文件夹</button>
</template>
